<?php
class Procedure extends AppModel {

	var $name = 'Procedure';
	var $primaryKey = 'proc_index';
	var $displayField = 'proc_reference';
	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
			'ProcedureType' => array('className' => 'ProcedureType',
								'foreignKey' => 'proc_ptype',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'Phase' => array('className' => 'Phase',
								'foreignKey' => 'proc_phase',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'Part' => array('className' => 'Part',
								'foreignKey' => 'proc_part',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'Version' => array('className' => 'Version',
								'foreignKey' => 'proc_version',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'Category' => array('className' => 'Category',
								'foreignKey' => 'proc_cat',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'Project' => array('className' => 'Project',
								'foreignKey' => 'proc_project',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'User' => array('className' => 'User',
								'foreignKey' => 'proc_created_by',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'User' => array('className' => 'User',
								'foreignKey' => 'proc_updated_by',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'User' => array('className' => 'User',
								'foreignKey' => 'proc_deleted_by',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			)
	);

	var $hasMany = array(
			'Step' => array('className' => 'Step',
								'foreignKey' => 'step_proc',
								'dependent' => false,
								'conditions' => '',
								'fields' => '',
								'order' => '',
								'limit' => '',
								'offset' => '',
								'exclusive' => '',
								'finderQuery' => '',
								'counterQuery' => ''
			),
			'ProcedureRequirement' => array('className' => 'ProcedureRequirement',
								'foreignKey' => 'pra_proc',
								'dependent' => false,
								'conditions' => '',
								'fields' => '',
								'order' => '',
								'limit' => '',
								'offset' => '',
								'exclusive' => '',
								'finderQuery' => '',
								'counterQuery' => ''
			)
	);

}
?>